package key.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Random;

/**
 * User: key
 * ClassName:RandomUtils
 * Date: 2023/5/8
 * Time: 22:28
 * description:
 */
public class RandomUtils {
    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
    public static String createTime(){
        return getTime() + Integer.toHexString(new Random().nextInt(900) + 100);
    }
    public static String getTime(){
        return sdf.format(Calendar.getInstance().getTime());
    }
    public static String createNum(){
        return getTime();
    }
}
